﻿<%@ Page Language="C#" AutoEventWireup="true" CodeFile="Uncommend.aspx.cs" Inherits="Customer_Uncommend"  MasterPageFile="../MasterPage.master" %>
<%@ OutputCache Duration="2" SqlDependency="CIM.Net:Dat_Stock" VaryByParam="none" %>
<%@ Import Namespace="System.Configuration" %>
<%@ Import Namespace="Common" %>
<%@ Import Namespace="DAL" %>

<%@ Register src="../common/Pager.ascx" tagname="Pager" tagprefix="uc2" %>


<%@ Register src="Customer_Left.ascx" tagname="Customer_Left" tagprefix="uc1" %>


<asp:Content ContentPlaceHolderID="ContentPlaceHolder1" runat="server">
    <table cellpadding="0" cellspacing="2" width="100%" border="0">
	<tr>
        <td class="leftTd"  valign="top" width="20%">
            
            <uc1:Customer_Left ID="Customer_Left1" runat="server" />
            
        </td>
		<td width="80%" valign="top">
		<table cellpadding="0" cellspacing="0" width="100%" border="0" align="center">
			<tr>
		        <td class="leftTd"  valign="top">
		        <table cellpadding="0" cellspacing="0" width="100%" border="0" align="center">
		        	<tr>
		            	<td class="titleStyle"><%= WebUtility.GetTitleByMenu(MenuType) %></td>
		            </tr>
		        </table>
		         <br />
		          <table width="98%" border="0" cellpadding="0" cellspacing="1" align="center" bgcolor="#000066">
	                <tr>
		                <td style="height: 30px;" class="banma22_1">&nbsp;投诉标题：<asp:TextBox ID="TOPIC" 
                                runat="server" Width="60px" CssClass="face"></asp:TextBox>&nbsp;&nbsp;
	                        <asp:TextBox ID="OneDate" runat="server" Width="70px" CssClass="face" Text="选择开始日期"></asp:TextBox>
	                        &nbsp;&nbsp;<asp:TextBox ID="TwoDate" runat="server" Width="70px" CssClass="face" Text="选择结束日期"></asp:TextBox>&nbsp;&nbsp;
                            <asp:Button ID="submit" runat="server" Text=" 搜 索 " CssClass="button" 
                                onclick="submit_Click" />
		                </td>
	                </tr>
                    </table><br/>
                    <asp:ListView ID="lv_UnCommend" runat="server" ondatabound="lv_UnCommend_DataBound" DataKeyNames="ID" >
                       <LayoutTemplate>
                            <table id="table1"  runat="server" width="98%" border="0" cellpadding="0" cellspacing="1" align="center" bgcolor="#000066">
                              <tr>
                                <td style="height: 25px; width: 5%;" class="banma1 TextCenters">序号</td>
                                <td style="height: 25px; width: 20%;" class="banma1 TextCenters">投诉标题</td>
                                <td style="height: 25px; width: 8%;" class="banma1 TextCenters">投诉内容</td>
		                        <td style="height: 25px; width: 15%;" class="banma1 TextCenters">回复内容</td>
		                        <td style="height: 25px; width: 6%;" class="banma1 TextCenters">投诉时间</td>
		                        <td style="width: 8%;" class="banma1 TextCenters">投诉人</td>
		                        <td style="width: 8%;" class="banma1 TextCenters">状态</td>
 	                            <td style="width: 6%;" class="banma1 TextCenters">操作</td>
	                          </tr>
                              <tr id="itemPlaceholder" runat="server" ></tr><br />
                            </table>
                       </LayoutTemplate>
                       <ItemTemplate>
                           <tr>
                            <td class="banma22_2" style="height: 25px; text-align: center;"><%# Container.DataItemIndex+1 %></td>
                            <td class="banma22_2" style="height: 25px; text-align: center;"><%# Eval("TOPIC") %></td>
                            <td class="banma22_2" style="height: 25px; text-align: center;"><%# Eval("CONTENT")%></td>
                            <td class="banma22_2" style="height: 25px; text-align: center;"><%# Eval("TOCONTENT")%></td>
                            <td class="banma22_2" style="height: 25px; text-align: center;"><%# Eval("CREATETIME")%></td>
		                    <td class="banma22_2" style="height: 25px; text-align: center;">
		                    <%# new Account().GetAccountName(Eval("USERKEY"))%></td>
		                    <td class="banma22_2" style="height: 25px; text-align: center;">
		                    <%# Convert.ToInt32(Eval("STATE")) == 0 ? "未回复" : "已回复"%></td>
	                        <td class="banma22_2" style="height: 25px; text-align: center;">
	                        <% if ((int)Session["UserType"] == 4) { %>
	                        <a href='UnCommend_Add.aspx?menutype=431&ID=<%# Eval("ID") %>'>回复</a>
	                        <asp:LinkButton ID="Delete" runat="server" CommandName="delete"  OnClientClick="return confirm('确认要删除吗？');">删除</asp:LinkButton>
	                        <% } %>
	                        </td>
	                       </tr> 
                      </ItemTemplate>
                       <AlternatingItemTemplate>
                           <tr>
                            <td class="banma22_1" style="height: 25px; text-align: center;"><%# Container.DataItemIndex+1 %></td>
                            <td class="banma22_1" style="height: 25px; text-align: center;"><%# Eval("TOPIC") %></td>
                            <td class="banma22_1" style="height: 25px; text-align: center;"><%# Eval("CONTENT")%></td>
                            <td class="banma22_1" style="height: 25px; text-align: center;"><%# Eval("TOCONTENT")%></td>
                            <td class="banma22_1" style="height: 25px; text-align: center;"><%# Eval("CREATETIME")%></td>
		                    <td class="banma22_1" style="height: 25px; text-align: center;">
		                    <%# new Account().GetAccountName(Eval("USERKEY"))%></td>
		                    <td class="banma22_1" style="height: 25px; text-align: center;">
		                    <%# Convert.ToInt32(Eval("STATE")) == 0 ? "未回复" : "已回复"%></td>
	                        <td class="banma22_1" style="height: 25px; text-align: center;">
	                        <% if ((int)Session["UserType"] == 4) { %>
	                        <a href='UnCommend_Add.aspx?menutype=431&ID=<%# Eval("ID") %>'>回复</a>
	                        <asp:LinkButton ID="Delete" runat="server" CommandName="delete"  OnClientClick="return confirm('确认要删除吗？');">删除</asp:LinkButton>
	                        <% } %>
	                        </td>
	                       </tr>  
                      </AlternatingItemTemplate>
	                  </asp:ListView>
	                   <!-- Page Begin -->
                    <asp:DataPager ID="DataPager1" runat="server" 
                        PagedControlID="lv_UnCommend" PageSize="20">
                                   <Fields>
                                    <asp:TemplatePagerField>
                                         <PagerTemplate>
                              
                              <table width="96%" border="0" cellpadding="0" cellspacing="0" align="center">
                                <tr>
                                    <td width="36%" height="30">
                                        页次：<b><%# WebUtility.GetCurrentPage(Container.StartRowIndex, Container.PageSize)%></b>/<b><%# WebUtility.GetTotalPage(Container.TotalRowCount, Container.PageSize)%></b>页 
                                        每页<b><%# Container.PageSize  %></b>条 共<b><%# Container.TotalRowCount %></b>条
                                    </td>
                                    <td width="64%" height="30" style="text-align: right;">
                                        分页：
                                        </PagerTemplate>
                                     </asp:TemplatePagerField>
                                     <asp:NextPreviousPagerField ButtonType="Image" FirstPageImageUrl="../images/first.gif" ShowFirstPageButton="true" ShowNextPageButton="false" ShowPreviousPageButton="false" />
                                     <asp:NumericPagerField CurrentPageLabelCssClass="SelectedPage" NumericButtonCssClass="NotSelectedPage" />
                                     <asp:NextPreviousPagerField ButtonType="Image" LastPageImageUrl="../images/last.gif"  ShowLastPageButton="true" ShowNextPageButton="false" ShowPreviousPageButton="false" />
                                     <asp:TemplatePagerField>
                                        <PagerTemplate>
                                               转到：
                                            <asp:DropDownList ID="PageList" runat="server" AutoPostBack="true" 
                                                onselectedindexchanged="PageList_SelectedIndexChanged" >
                                            </asp:DropDownList>
                                                </td>
                                            </tr>
                                        </table>
                                         </PagerTemplate>
                                     </asp:TemplatePagerField>
                                   </Fields>
                        </asp:DataPager>
                        <asp:ObjectDataSource ID="UnCommendOBJ" runat="server" EnablePaging="True" 
                        MaximumRowsParameterName="MaxRows" SelectCountMethod="SelectUnCommendCount" 
                        SelectMethod="SelectUnCommend" StartRowIndexParameterName="StartRowIndex" 
                        TypeName="DAL.UnCommend"  DeleteMethod="DelUnCommend">
                            <SelectParameters>
                                <asp:Parameter Name="StartRowIndex" Type="Int32" />
                                <asp:Parameter Name="MaxRows" Type="Int32" />
                                <asp:ControlParameter ControlID="TOPIC" Name="TOPIC" PropertyName="Text" />
                                <asp:ControlParameter ControlID="OneDate" Name="OneDate" PropertyName="Text" />
                                <asp:ControlParameter ControlID="TwoDate" Name="TwoDate" PropertyName="Text" />
                            </SelectParameters>
                            <DeleteParameters>
                              <asp:Parameter Name="ID" Type="Int32"  />
                            </DeleteParameters>
                    </asp:ObjectDataSource>
                        <!-- Page End -->
        </td>
    </tr>
</table>
</asp:Content>

